<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8"/>
    <title>注册页面</title>
    <meta name="keywords" content="DeathGhost,DeathGhost.cn,web前端设,移动WebApp开发"/>
    <meta name="description" content="DeathGhost.cn::H5 WEB前端设计开发!"/>
    <meta name="author" content="DeathGhost"/>
    <link th:href="@{/style/style.css}" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" th:src="@{/js/public.js}"></script>
    <script type="text/javascript" th:src="@{/js/jquery.js}"></script>
    <script type="text/javascript" th:src="@{/js/jqpublic.js}"></script>
</head>

<body>
<!--引用头部导航栏代码块-->
<div th:replace="~{commons/common::top}"></div>

<!--Start content-->
<section class="Psection MT20">
    <form method="post" th:action="@{/user/register}">
        <table class="Register">
            <tr>
                <!--如果msg为空，则不提示错误信息 if条件-->
                <td></td>
                <td th:text="${msg}" style="color: #e01e1e" th:if="${not #strings.isEmpty(msg)}" class="Font16" align="left"></td>
            </tr>
            <tr>
                <td width="40%" align="right" class="FontW" style="color: firebrick">用户名：</td>
                <td><input type="text" name="username" th:value="${user1.username}" required autofocus></td>
            </tr>
            <tr>
                <td width="40%" align="right" class="FontW" style="color: firebrick">密码：</td>
                <td><input type="password" name="password" th:value="${user1.password}" required></td>
            </tr>
            <tr>
                <td width="40%" align="right" class="FontW">真实姓名：</td>
                <td><input type="text" name="truename" th:value="${user1.truename}" placeholder="选填"></td>
            </tr>
            <tr>
                <td width="40%" align="right" class="FontW" style="color: firebrick">电子邮件：</td>
                <td><input type="email" name="email" th:value="${user1.email}" required></td>
            </tr>
            <tr>
                <td width="40%" align="right" class="FontW" style="color: firebrick">手机号码：</td>
                <td><input type="text" name="phone" required pattern="[0-9]{11}" th:value="${user1.phone}"></td>
            </tr>
            <tr>
                <td width="40%" align="right" class="FontW" style="color: firebrick">地址：</td>
                <td><input type="text" name="address" th:value="${user1.address}" required></td>
            </tr>
            <tr>
                <td width="40%" align="right" class="FontW" style="color: firebrick">验证码：</td>
                <td><input type="text" name="code" required>
                 <a onclick="getImage()" style="cursor:pointer"><img id="num" class="codeimg" th:src="@{/getImage}"/></a>
                </td>
            </tr>
            <tr>
                <td width="40%" align="right"></td>
                <td><input type="submit" class="Submit_b" value="注 册">( 已经注册，<a th:href="@{/login}" class="BlueA">请登录</a>)
                </td>
            </tr>
        </table>
    </form>
</section>
<!--End content-->
<!--引用底部栏代码块-->
<div th:replace="~{commons/common::last}"></div>
</body>
</html>
